{extend name='common/dialog'/}
{block name='content'}
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <div class="edit-avatar">
                    <img id="img-avatar" src="{$admin.avatar|default='__BACKEND__/img/avatar.png'}" alt="..."
                         class="img-avatar">
                    <div class="avatar-divider"></div>
                    <div class="edit-avatar-content">
<!--                        data-formdata='{"admin_id":"{$admin.id}"}'-->
                        <button class="btn btn-default webupload" data-preview-id="img-avatar"
                                data-input-id="save-avatar" id="avatar_upload" data-mimetype="image/*" >修改头像
                        </button>
                        <p class="m-0">把你认为你最帅/美的照片挂上去吧。</p>
                    </div>
                </div>
                <hr>
                <form class="form-horizontal " data-toggle="validator" method="POST" role="form" data-loading="3">
                    <input type="hidden" name="row[id]" value="{$admin.id}">
                    <input type="hidden" name="row[token]" value="{:token();}">
                    <input type="hidden" name="row[avatar]" id="save-avatar" value="{$admin.avatar|default='__BACKEND__/img/avatar.png'}">
                    <div class="form-group">
                        <label for="user_name" class="control-label">用户名</label>
                        <div class="form-item">
                            <input type="text" class="form-control" data-rule="required" disabled name="row[user_name]"
                                   id="user_name"
                                   value="{$admin.user_name}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="nick_name" class="control-label">昵称</label>
                        <div class="form-item">
                            <input type="text" class="form-control" name="row[nick_name]" id="nick_name"
                                   placeholder="输入您的昵称"
                                   value="{$admin.nick_name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="mobile" class="control-label">手机号</label>
                        <div class="form-item">
                            <input type="text" class="form-control" name="row[mobile]" id="mobile"
                                   data-rule="mobile" placeholder="请输入正确的手机号码" value="{$admin.mobile}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="control-label">邮箱</label>
                        <div class="form-item">
                            <input type="email" class="form-control" name="row[email]" id="email"
                                   data-rule="email" placeholder="请输入正确的邮箱地址" value="{$admin.email}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="mobile" class="control-label">密码</label>
                        <div class="form-item">
                            <input type="password" class="form-control" name="row[password]" id="password"
                                   placeholder="密码修改，不填写则不修改" value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="remark" class="control-label">简介</label>
                        <div class="form-item">
                            <textarea class="form-control" name="row[remark]" id="remark"
                                      rows="3">{$admin.remark}</textarea>
                        </div>
                        <small>剩余<span>500</span>个字符</small>
                    </div>
                    <button type="submit" class="btn btn-primary">保存</button>
                </form>
            </div>
        </div>
    </div>

</div>
{/block}